/**
 * 用户登录信息存储、获取、删除
*/
import storage from '@/util/localstorage/index.js'

let store_userinfo_key = "storeuserinfokey"

export default {
	getUserinfo() {
		let userinfo = storage.getStorage(store_userinfo_key)
		return userinfo
	},
	setUserinfo(user = {}) {
		if (user.sessionid) {
			storage.setStorage({
				key: store_userinfo_key,
				jsonstr: user
			})
		}
	},
	delUserinfo() {
		storage.removeStorage(store_userinfo_key)
	}
}
